<?php
/**
 * Controller to manage pages in admin area
 * 
 * @author Konstantin Shamko <konstantin.shamko@gmail.com> 
 * @version 0.0.1
 * @copyright  Copyright (c) 2009 Konstantin Shamko
 * @category VaselinEngine
 * @package Content Module
 * @subpackage Controller
 * @license  New BSD License
 *
 */
class admin_PagesController extends Bel_Controller_Aed {
	
	/**
	 * Initialization
	 *
	 */
	function init() {
		$this->_model = new Models_Content_Pages ( );
		$this->_formname = 'pages_form';
		$this->_items_on_page = 25;
		parent::init ();		
	}
	
    /**
     * Clears page's cache. Runs after page modifying 
     *
     */
	protected function _afterModify(){
		if($this->_current_entry){
			Helpers_Content_Cache::cleanPageCache($this->_current_entry['page_system_name']);
		}
	}

    /**
     * Clears pages's cache. Runs after page delete operation
     *
     */	
	protected function _afterDelete(){
		$this->_afterModify();
	}
}